/**
 *Maze.java
 *@anthor Daniel Liu
 *2006-5-15 ����05:57:59
 **/
package maze;

import java.awt.Color;

public class Maze {
	/*
	 * A maze is made up of walls and corridors. maze[i][j] is either part of a
	 * wall or part of a corridor. A cell that is part of a cooridor is
	 * represented by path, if it is part of the current path through the maze,
	 * by visited, if it has already been explored without finding a solution,
	 * and by empty if it has not yet been explored.
	 */
	public final static int wall = 0;
	public final static int path = 1;
	public final static int empty = 2;
	public final static int visited = 3;
	public final static int entry = 4;
	public final static int exit = 5;
	public final static int background = 6;
	private int[][] data = null;
	private Color[] colors = null;
	public Cell entryCell = null;
	public Cell exitCell = null;
	public int rowCount = -1;
	public int columnCount = -1;

	Maze(int row, int column) {
		this.data = new int[row][column];
		this.colors = new Color[7];
		this.rowCount = row;
		this.columnCount = column;
	}

	/**
	 * Getters & Setters
	 */
	public void setColor(int field, Color color) {
		this.colors[field] = color;
	}

	public Color getColor(int field) {
		return this.colors[field];
	}

	public void set(int row, int column, int value) {
		this.data[row][column] = value;
	}

	public int get(int row, int column) {
		return this.data[row][column];
	}
}
